-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recalculate intermediate hashes using current tree. #369
Recalculate intermediate hashes using current tree. #369
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work.
merkle/merkle_path.go
Outdated
@@ -38,14 +38,35 @@ func (n NodeFetch) Equivalent(other NodeFetch) bool { | |||
return n.Rehash == other.Rehash && n.NodeID.Equivalent(other.NodeID) | |||
} | |||
|
|||
// checkSnapshot performs a couple of simple sanity checks on sa and treeSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sa? typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, fixed.
merkle/merkle_path.go
Outdated
// and returns an error if there's a problem. | ||
func checkSnapshot(ssDesc string, ss, treeSize int64) error { | ||
if ss < 1 { | ||
return fmt.Errorf("%s %d < 1", ssDesc, ss) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add something to the error message to show where it's from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at the next level up, how's that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
877b0ac
to
61b0e96
Compare
…m 589b12611..55c1d0c85 8cc3a55af Add custom options to allow more control of swagger/openapi output (google#145) b0be3cdef runtime: fix chunk encoding 82b83c781 protoc-gen-swagger optional SourceCodeInfo 1fd8ba6a5 Fix logic handling primitive wrapper in URL params b2423da79 runtime: use r.Context() (google#473) c323909dd Add Handler method to pass in a client (google#454) ac41185c3 Fallback to JSON name when matching URL parameter. (google#450) 8bec008bd fix 2 typos in Registry.SetPrefix's comment de5a00fcc Reference Gulp by a more complete path 185dda2d4 Fix build. 824b9a716 Test with Go 1.9. f2862b476 Memoise calls to fullyQualifiedNameToSwaggerName to speed it up for large registries (google#421) 1a03ca3ba Update DO NOT EDIT template. (google#434) a5c7982c0 Update Swagger Codegen from 2.1.6 to 2.2.2 (google#415) d64f5319e ISSUE#405: customize the error return (google#409) c6f7a5ac6 improve {incoming,outgoing}HeaderMatcher logic (google#408) 2a40dd795 Return if runtime.AnnotateContext gave error (google#403) 47a11d786 jsonpb: update tests to reflect new jsonpb behavior (google#401) f6f92fcd9 Reference import grpc Status to suppress unused errors. (google#387) 979be44d9 fixes package name override doesn't work (google#277) b1e4aed16 Skip unreferenced messages in definitions. (google#371) ca4c8d6af ci: regen with current protoc-gen-go (google#385) 7195ea445 Use status package for error and introduce WithProtoErrorHandler option (google#378) 4539fc575 Add response headers from grpc server (google#374) 597c8c358 support allow_delete_body for protoc-gen-grpc-gateway (google#318) 55d0969c0 Use canonical header form in default header matcher. (google#369) 893772d22 Extend ServeMux to allow user configurable header forwarding. git-subtree-dir: vendor/github.com/grpc-ecosystem/grpc-gateway git-subtree-split: 55c1d0c857e5c6cadb0ee292f6cc36621cd5ea8c
No description provided.